package org.red.checkSystem.controller.check;

import com.alibaba.fastjson2.JSON;
import org.red.checkSystem.pojo.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.red.checkSystem.service.check.checkAutoService;
@RestController
public class checkAutoController {
    @Autowired
    checkAutoService checkAutoService;

    @PostMapping("/check/autoCheck/")
    public String autoCheck(@RequestParam MultiValueMap<String,String> map){
        Article article = JSON.parseObject(map.getFirst("article"),Article.class);
        return checkAutoService.checkAuto(article);
    }
}
